package net.asg.games.yokeltowers;

import net.asg.games.yokeltowers.view.BlockYokelGameObject.BlockType;
import net.asg.games.yokeltowers.view.YokelGameObject;
import net.asg.games.yokeltowers.view.YokelGameObjectFactory;

import com.badlogic.gdx.math.MathUtils;


public class LevelManager {
	private float speedBonus = 19.9f;
	private float debrisSpeed = 10.9f;
	private float fallSpeed = 1.9f;

	public YokelGameObject.BlockState state;

	public LevelManager(boolean stageType) {
		state = YokelGameObject.BlockState.FALLING;
	}

	public String toString() {
		String out = "Board State : " + state;
		return out;
	}

	public YokelGameObject getNextObject(YokelGameObjectFactory yokelGameObjectFactory) {
		switch (MathUtils.random(0, 5)){
		case 0:
			return yokelGameObjectFactory.getThreeColumn(BlockType.K_BLOCK,BlockType.O_BLOCK,BlockType.Y_BLOCK);
		case 1:
			return yokelGameObjectFactory.getThreeColumn(BlockType.BASH_BLOCK,BlockType.L_BLOCK,BlockType.E_BLOCK);
		default:
			return yokelGameObjectFactory.getRandomColumn();
		}
	}

	public float getSpeedBonus() {
		return speedBonus;
	}
	
	public float getDebrisSpeed() {
		return debrisSpeed;
	}
	
	public float getFallSpeed() {
		return fallSpeed;
	}

	public void setSpeedBonus(float speedBonus) {
		this.speedBonus = speedBonus;
	}
	
	public void setLevelState(YokelGameObject.BlockState objState){
		this.state = objState;
	}
}
